package com.elm.user.service.impl;


import com.elm.user.mapper.UserMapper;
import com.elm.user.pojo.User;
import com.elm.user.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserServiceImpl implements UserService {
    @Autowired
    private UserMapper userMapper;

    @Override
    public User getUserByIdByPass(User user) {
        return userMapper.getUserByIdByPass(user);
    }

    @Override
    public List<User> getUserById(String userId) {
        return userMapper.getUserById(userId);
    }

    @Override
    public int updateUser(User user) {
        return userMapper.updateUser(user);
    }

    @Override
    public void register(User user) {
        userMapper.register(user);
    }

    @Override
    public User getInfo(String userId) {
        return userMapper.getInfo(userId);
    }
}
